package com.acme.bankapp;

import com.acme.bankapp.domain.bank.account.Account;
import com.acme.bankapp.domain.bank.account.CheckingAccount;
import com.acme.bankapp.domain.bank.account.SavingsAccount;
import com.acme.bankapp.domain.bank.client.Client;
import com.acme.bankapp.domain.bank.client.Gender;

public class TestApplication {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		testEqualsClassClient();
		
		testEqualsClassAccount();

	}

	
	private static void testEqualsClassClient() {
		Client client = new Client("Test", Gender.MALE);
		Client anotherClient = new Client("Test", Gender.MALE);
		System.out.println("Client:");
		System.out.println("==: " +  (client == anotherClient));
		System.out.println("equals: " + client.equals(anotherClient));
	}
	
	private static void testEqualsClassAccount() throws IllegalArgumentException {
		Account account = new SavingsAccount(123);
		Account anotherAccount = new SavingsAccount(123);
		Account veryAnotherAccount = new CheckingAccount(123, 321);
		System.out.println("Account:");
		System.out.println("==: " + (account == anotherAccount));
		System.out.println("equal (same class): " + (account.equals(anotherAccount)));
		System.out.println("equal (different class): " + (account.equals(veryAnotherAccount)));
	}
}
